package tree.nodeType.Boolean;


import java.util.ArrayList;

import pools.PoolsManager;
import tree.Node;
import tree.TreeNodesManager;
import tree.nodeType.BooleanFunction;

public abstract class BooleanNumericSonsFunction extends BooleanFunction{
	
	public BooleanNumericSonsFunction(int sonsNeeded, Node parent,TreeNodesManager treeNodesManager
										,int depth) {
		super(sonsNeeded, parent,depth);
		hasConstSon=false;
		if (treeNodesManager!=null){
			treeNodesManager.addBooleanNumericNode(this);
		}
	}
	
	@Override
	protected ArrayList<Node> getProperNodesManagerList(
			TreeNodesManager treeNodeManager) {
		return treeNodeManager.getAllBooleanNumericFunctionInTree();
	}
	
	public BooleanNumericSonsFunction() {}
	
//	@Override
//	public Node getRandNodeWithTheSameReturnType(int maxDepth,TreeNodesManager tnm){
//		return PoolsManager.get().getRandomBooleanNode(getDepth(),maxDepth, getParent(),tnm);
//	}
	@Override
	public Node getRandNode(int maxDepth,TreeNodesManager tnm){
		return PoolsManager.get().getRandomBooleanWithNumericSonsNode(getDepth(),maxDepth, getParent(),tnm);
	}
	
	
}
